/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package concurrencia;

/**
 *
 * @author eltorre
 */
public class Request extends Thread{

    public Request(String what, boolean toServer, Object obj, Callback call)
    {
        this.toServer = toServer;
        this.what = what;
        this.obj = obj;
        this.call = call;
    }
    
    @Override
    public void run()
    {
        System.out.println("Start of request "+ what + " to server: (" + toServer + ")");
        Object reply = null;
        
        
        call.doThing(reply);
    }
    
    
    public Object getObj() {
        return obj;
    }

    public boolean isToServer() {
        return toServer;
    }

    public String getWhat() {
        return what;
    }
 
    public Callback getCall() {
        return call;
    }

    private boolean toServer;
    private String what;
    private Object obj;
    private Callback call;


    
}
